package com.youlu.campus.entity.domain;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class SingleMatchDomain implements Comparable<SingleMatchDomain> {
    private List<String> match = new ArrayList<>();
    private Integer ratio = 0;

    /**
     * 长度逆序排序
     *
     * @param o
     * @return
     */
    @Override
    public int compareTo(SingleMatchDomain o) {
        return -this.ratio.compareTo(o.getRatio());
    }
}
